home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------
- //
- // This code is copyright 2001 by G5 Software.
- // Any unauthorized usage, either in part or in whole of this code
- // is strictly prohibited. Violators WILL be prosecuted to the
- // maximum extent allowed by law.
- //
- //-------------------------------------------------------------------
-
- class CSovietTruckMesh
- {
- string MeshFile = "Models/S_Truck.mesh";
- string SkinFile = "Models/S_Truck.skin";
- string AnimFile = "Models/S_Truck.anim";
- }
-
- class CSovietTruckStateControl extends CMobileGroundUnitStateControl
- {
- void CSovietTruckStateControl()
- {
- CMobileGroundUnitStateControl(500.0);
- m_DestroyPause = 7.5;
- m_ExplosionId = "EXPLID_SovietTruckExplosion";
- }
- }
-
- class CSovietTruckBehavior extends CBaseBehavior, CSovietTruckMoveParameters
- {
- boolean CanFire = false; // tell behavior that object cannot fire
- boolean HasRadar = true;
-
- float MaxRadarDistance = 500; // m
- float MinRadarDistance = 10; // m
-
- int UpdateRadarPeriod = 2000; // ms
- int UpdateRadarPeriodRandAdd = 5000; // ms
-
- boolean FireFlying = false;
- boolean FireGround = true;
-
- void CSovietTruckBehavior()
- {
- CBaseBehavior();
- }
- }
-
- class CSovietTruckMoveParameters
- {
- boolean CanMove = true;
-
- float MaxSpeed = 14; // m/s
- float MaxAngleSpeed = 2; // rad/s
- float MaxAccelleration = 15; // m/(s*s)
- float MaxAngleAccelleration = 10; // rad/(s*s)
-
- float MoveBank = -.03; //#TMP:
- float RotationBank = .006; //#TMP:
- }
-
- class CSovietTruck extends
- CGroundUnit,
- CArmedUnit,
- CUnitWithSound,
- CUnitWithCamera,
- CUnitWithStateControl,
- CUnitWithBehavior
- {
- void CSovietTruck()
- {
- InitializeModelAsStatic("CSovietTruckMesh");
- CUnitWithStateControl("CSovietTruckStateControl");
- InitializeSound("CSovietTruckEngineSound");
-
- //#TODO create weapons
-
- InitializeVehicleBehavior("CSovietTruckBehavior");
-
- Core_AddClassificator("Russian");
- Core_AddClassificator("Truck"); // for cockpit identification
- Core_AddClassificator("GroundUnit"); // for behavior fire logic
- }
- }
-
-